package com.ctshk.rpc.order.custom.dto.order;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

/**
 * 订单详情dto
 */

@Data
@ApiModel(value="订单详情dto", description="订单详情dto")
public class CustomOrderDetailDTO implements Serializable {
    @ApiModelProperty(value = "ID")
    private Long id;
    @ApiModelProperty(value = "订单号")
    private String orderNumber;
    @ApiModelProperty(value = "团期ID")
    private Long scheduleId;
    @ApiModelProperty(value = "总应收")
    private BigDecimal totalReceivables;
    @ApiModelProperty(value = "总实收")
    private BigDecimal totalPaidIn;
    @ApiModelProperty(value = "剩余应收")
    private BigDecimal remainingReceivables;
    @ApiModelProperty(value = "已退款")
    private BigDecimal refundAmount;
    @ApiModelProperty(value = "总团费")
    private BigDecimal totalTourFee;
    @ApiModelProperty(value = "代收费用")
    private BigDecimal collectionFee;
    @ApiModelProperty(value = "调整费用")
    private BigDecimal adjustmentCost;
    @ApiModelProperty(value = "其他金额")
    private BigDecimal otherAmount;
    @ApiModelProperty(value = "联络人中文姓")
    private String contactCnSurname;
    @ApiModelProperty(value = "联络人中文名")
    private String contactCnName;
    @ApiModelProperty(value = "联络人英文姓")
    private String contactEnSurname;
    @ApiModelProperty(value = "联络人英文名")
    private String contactEnName;
    @ApiModelProperty(value = "联络人性别")
    private Integer contactGender;
    @ApiModelProperty(value = "联络电话")
    private String contactTelephones;
    @ApiModelProperty(value = "联系邮箱")
    private String contactEmail;
    @ApiModelProperty(value = "内部备注")
    private String internalRemark;
    @ApiModelProperty(value = "客户类型")
    private Integer customerType;
    @ApiModelProperty(value = "游客人数")
    private List<CustomOrderPageTouristPeopleDTO> touristPeopleList;
    @ApiModelProperty(value = "总人数")
    private Integer totalPeople;
    @ApiModelProperty(value = "报价类型 (1 自由报价 2 套餐报价)")
    private Integer schedulePriceType;
    @ApiModelProperty(value = "旅客套餐记录")
    private List<OrderTouristPriceDTO> touristPriceList;

    @ApiModelProperty(value = "团号")
    private String tripNumber;
    @ApiModelProperty(value = "行程名称")
    private String tripTitle;
    @ApiModelProperty(value = "行程副标题")
    private String tripSubtitle;
    @ApiModelProperty(value = "目的地")
    private String destination;
    @ApiModelProperty(value = "出发地")
    private String departurePlace;
    @ApiModelProperty(value = "出发日期")
    private LocalDate departureDate;
    @ApiModelProperty(value = "出发日期星期几")
    private String departureWeekDay;
    @ApiModelProperty(value = "返程日期")
    private LocalDate returnDate;
    @ApiModelProperty(value = "返程日期星期几")
    private String returnWeekDay;

    @ApiModelProperty(value = "负责人姓名")
    private String chargePersonName;
    @ApiModelProperty(value = "负责人部门")
    private String chargePersonDept;

    @ApiModelProperty(value = "大客户ID")
    private Long bigClientId;

    @ApiModelProperty(value = "大客户名称")
    private String bigClientName;

    /*public void setTouristPeopleList(String touristPeopleList) {
        this.touristPeopleList = new ArrayList<>();
        try {
            String[] lineArray = touristPeopleList.split("\\}\\)");
            for (String line : lineArray) {
                String[] columnArray = line.split("]\\)");
                CustomOrderPageTouristPeopleDTO dto = new CustomOrderPageTouristPeopleDTO();
                if (columnArray.length > 0) {
                    dto.setTouristTypeName(columnArray[0]);
                }
                if (columnArray.length > 1) {
                    dto.setPeople(Integer.valueOf(columnArray[1]));
                }
                this.touristPeopleList.add(dto);
            }
        } catch (Exception e) {
        }
    }*/
}
